﻿using SurveySez.Model;

namespace SurveySez.ViewModel.Editor
{
	public class GameSurveyHeaderViewModel
	{
		private GameSurvey _gameSurvey;

        public GameSurveyHeaderViewModel(GameSurvey gameSurvey)
		{
			_gameSurvey = gameSurvey;
		}

		public GameSurvey GameSurvey
		{
			get { return _gameSurvey; }
		}

		public string Question
		{
			get { return _gameSurvey.Survey.Question; }
		}

		public override bool Equals(object obj)
		{
			if (obj == this)
				return true;
			GameSurveyHeaderViewModel that = obj as GameSurveyHeaderViewModel;
			if (that == null)
				return false;
			return this._gameSurvey == that._gameSurvey;
		}

		public override int GetHashCode()
		{
			return _gameSurvey.GetHashCode();
		}
	}
}
